<?php
session_start() ;
if(!isset($_SESSION["login"]) || $_SESSION["login"] == "")
{   
  header("Location: index.php?error=4") ;
}
require("fonctions.php");
$code=$_GET["error"];
$action = $_GET["action"];
if($lang=="FR"){
    $lang="FR";
    include("lang/fr_lang.php");
}elseif($lang=="EN"){
    $lang="EN";
    include("lang/en_lang.php");
}else{
    $lang="FR";
    include("lang/fr_lang.php");
}

?>

<html>
<head>
<title><?php echo TXT_TITLE;?></title>
 <link rel="stylesheet" type="text/css" href="style.css" >  
<script type="text/javascript">
//<![CDATA[

function valider() {
  // si la valeur du champ prenom est non vide
  if((document.form1.nom.value != "") && (document.form1.prenom.value != "") && (document.form1.email.value != "") && (document.form1.profil.value != "") && (document.form1.instit.value != "")) {
    // alors on envoie le formulaire
    document.form1.submit();
    return true;
  }
  else {
    // sinon on affiche un message
    alert("Remplir les champs obligatoires avant d'enregistrer svp !");
    return false;
  }

}
</script>
</head>

<body>
<?php require("menu.php");
?>
<br>
<?php echo error_message($code);?>
<div class="texte_acc">
    <p class="titre_1"><u><?php echo TXT_LIST_FICHES;?> </u></p>

 <table class="tab_lis_op3">
    
    <tr>
        <th class="tab_dis_head"><?php echo TXT_NUM_FICHE;?></th>
         <th class="tab_dis_head"><?php echo TXT_UTILISATEUR;?></th>
        <th class="tab_dis_head"><?php echo TXT_TYPE_FORM;?></th>
        <th class="tab_dis_head"><?php echo TXT_DATE_CREATION;?></th>
        <th class="tab_dis_head"><?php echo TXT_DETAILS;?></th>
    </tr>
<?php
    $sql="select * from asso_users_fiches";
    $res = @mysql_query($sql);
    while($r =@mysql_fetch_object($res)){
?>
<tr>
   <td class="tab_dis_data"><?php echo"$r->id_fiche";?></td>
   <td class="tab_dis_data"><?php echo getUserNameById($r->id_user);?></td>
    <td class="tab_dis_data"><?php echo getTypeProductionById($r->id_form);?></td>
     <td class="tab_dis_data"><?php echo $r->crea_date;?></td>
    <td class="tab_dis_data"><a href="form_<?php echo $type_prog;?>.php?id_fiche=<?php echo"$r->id_fiche"?>"><?php echo TXT_VOIR_DETAILS;?></a></td></tr>

   
<?php }?>
</table>
    
    
</div>

<?php
require_once ("footer.php");
?>
